package prototype.flyGameDemo.modify;

import java.util.ArrayList;
import java.util.Random;

/**
 * @author： pang-yun
 * @date： 2021-10-22 17:33
 * 功能目的 ：用于   客户端  调用敌机
 */

public class Client {
    public static void main(String[] args) {
        ArrayList<EnemyPlane> list = new ArrayList<>();
        for (int i=0;i<10;i++){
            try {
                EnemyPlane enemyPlane = EnemyPlaneFactory.getInstance(new Random().nextInt(100),new Random().nextInt(5),new Random().nextInt(6));
                list.add(enemyPlane);
            } catch (CloneNotSupportedException e) {
                e.printStackTrace();
            }
        }
       list.stream().forEach(System.out::println);
    }
}
